define( ["com/opentext/modules/page","com/opentext/modules/document"], function( OTP, OTD ) {
	var me = this;

	me.data = {
		cfg: {
			"frame":"Viewer",
		},
		doc: null
	};

	return {
		data: this.data,
		show: function() {
			var me = this;
			console.log("viewer.show()");
		},
	
		init: function() {
			var me = this;
			console.log("viewer.init()");
			me.data.doc = OTD;
		},
	
		addPage: function(t) {
			var me = this;
			var p = new OTP(t);
			p.addText(t);
			me.data.doc.addPage(p);
			console.log("Viewer.add()");
		}
	}
});
